package com.framework.bdf4j.sysadm.entity;

import java.util.Date;

import com.baomidou.mybatisplus.annotation.IdType;
import com.baomidou.mybatisplus.annotation.TableField;
import com.baomidou.mybatisplus.annotation.TableId;
import com.baomidou.mybatisplus.annotation.TableLogic;
import com.baomidou.mybatisplus.extension.activerecord.Model;
import com.github.liaochong.myexcel.core.annotation.ExcelColumn;
import com.github.liaochong.myexcel.core.annotation.ExcelModel;
import com.github.liaochong.myexcel.core.annotation.IgnoreColumn;

import io.swagger.annotations.ApiModel;
import io.swagger.annotations.ApiModelProperty;
import lombok.Data;
import lombok.EqualsAndHashCode;

/**
 * <p>
 * 角色表
 * </p>
 *
 */
@Data
@ApiModel(value = "角色")
@EqualsAndHashCode(callSuper = true)
@ExcelModel(sheetName = "角色信息", includeAllField = false)
public class SysRole extends Model<SysRole> {

    private static final long serialVersionUID = 1L;

    @TableId(value = "role_id", type = IdType.AUTO)
    @ApiModelProperty(value = "角色编号")
    @IgnoreColumn
    private Integer roleId;

    @ApiModelProperty(value = "角色名称")
    @ExcelColumn(order = 0, title = "角色名称")
    private String roleName;

    @ApiModelProperty(value = "角色标识")
    @ExcelColumn(order = 1, title = "角色标识")
    private String roleCode;

    @ApiModelProperty(value = "角色描述")
    @ExcelColumn(order = 2, title = "角色描述")
    private String roleDesc;

    @ApiModelProperty(value = "数据权限类型")
    private Integer dsType;
    /**
     * 数据权限作用范围
     */
    @ApiModelProperty(value = "数据权限作用范围")
    private String dsScope;
    /**
     * 创建时间
     */
    @ApiModelProperty(value = "创建时间")
    private Date createTime;
    /**
     * 修改时间
     */
    @ApiModelProperty(value = "修改时间")
    private Date updateTime;
    /**
     * 删除标识（0-正常,1-删除）
     */
    @TableLogic
    @ApiModelProperty(value = "删除标记,1:已删除,0:正常")
    private String delFlag;

    /**
     * 用户是否存在此角色标识 默认不存在
     */
    @TableField(exist = false)
    private boolean flag = false;

}
